//! 租户（命名空间）服务trait

use async_trait::async_trait;
use crate::{Result, Tenant};

/// 租户（命名空间）服务trait
#[async_trait]
pub trait TenantService: Send + Sync + std::fmt::Debug {
    /// 获取租户信息
    async fn get_tenant(&self, tenant_id: &str) -> Result<Option<Tenant>>;

    /// 创建租户
    async fn create_tenant(&self, tenant: &Tenant) -> Result<()>;

    /// 删除租户
    async fn delete_tenant(&self, tenant_id: &str) -> Result<()>;

    /// 列出所有租户
    async fn list_tenants(&self) -> Result<Vec<Tenant>>;
}
